
function actionComment(userid,articleID){
	var result=assertUserLogin();//看看用户是否已经登录
	if(!result.status){
		//用户还未登录？，弹出登录模态框进行登录
		loginHandler();
		return;
	}
	if($("#mycomment").val()==null || $("#mycomment").val() == ''){
		toastr.info('评论不能为空哦！')
	}else if($("#mycomment").val().length<10){
		toastr.info('最少留下10个字嘛....')
	}else{
		$.getJSON("/cms/article/insertComment",{"userID":userid,"articleID":articleID,"content":$("#mycomment").val()},function(data){
			if(data.status==500){
				toastr.info("添加评论失败！");
			}else{
				toastr.info("评论成功！");
				setTimeout("refreshAtricle("+articleID+")",300);
			}
		})
	}
}
function refreshAtricle(articleID){
	location.href = "/cms/article/detail?id="+articleID;
}








